<?php


namespace app\api\controller;


use app\api\lists\StaffLists;
use app\api\logic\StaffLogic;

class StaffController extends BaseShopController
{
    public array $notNeedLogin = ['lists','detail'];


    /**
     * @notes 师傅列表
     * @return \think\response\Json
     * @author ljj
     * @date 2022/2/23 5:56 下午
     */
    public function lists()
    {
        return $this->dataLists(new StaffLists());
    }

    /**
     * @notes 师傅详情
     * @return \think\response\Json
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     * @author ljj
     * @date 2022/2/23 6:34 下午
     */
    public function detail()
    {
        $id = $this->request->get('id');
        $result = (new StaffLogic())->detail($id);
        return $this->success('',$result);
    }
}